﻿@model PagedList<HMoPro.Models.checkvr>
@using Webdiyer.WebControls.Mvc;
@{
    ViewBag.Title = "checkVr";
}
<script type="text/javascript">
    var datazip;
    var resourceid;
    function look(obj) {
        datazip = obj.id;
        //datazip = obj.data-zip;
        resourceid = $('#'+datazip).attr("data-res");
       var aa = window.location.host;
        $.ajax({
            url: "@Url.Action("QRcode")",
            data: { "resourceid": resourceid, "datazip": datazip, "url": aa },
                dataType: "json",
                type: "POST",
                success: function (data) {

                    //    $("#dianzan").attr('disabled', true);

                    //resourceid, datazip, inboxname
                    window.open("@Url.Action("QRcodeImage")"+"?resourceid="+data.resourceid+"&datazip="+data.datazip+"&inboxname="+data.inboxname);

                    @*   window.location.href ="@Url.Action("QRcodeImage")"+"?resourceid="+'@Model.resourceid';*@
                }
            });




        // this.style.color = "red";
        //   $("#categorylist").remove(obj.id);
    }
    //变量名中多了空格，倒置调试了半天
</script>

    @*@foreach(var item in Model) {
        <div class="col-xs-4 col-sm-2">
            <a href="@Url.Action("checkVr", new {rescourceid=item.resourceid})"> <img src="../../Uploads/@item.resourceid/@item.imageurl" class="img-responsive" /></a>
        </div>
    }*@
    <div class="col-xs-12"><h4>推荐资源</h4></div>
    @foreach (var item in Model)
    {
        <div class="col-xs-6 col-sm-3">
            <div class="showTm">
                <a href="@Url.Action("checkVr", new {rescourceid=item.resourceid})"> <img src="../../Uploads/@item.resourceid/@item.imageurl" class="img-responsive" /></a>
                <h5>@item.Title</h5>
                <div class="dd">
                    <p class="pull-left">
                        <span class="width-bf db">@item.PlayTime</span>
                        <span class="width-bf dz">@item.PraiseTime</span>
                    </p>
                    @{Html.RenderAction("browseListIndex", new { resourceid = item.resourceid });}
                </div>
            </div>
        </div>
    }
        @Html.Pager(Model,new PagerOptions()
        {
    PageIndexParameterName = "id",
    ShowPageIndexBox = true,
    ShowGoButton = true,
    PageIndexBoxWrapperFormatString = "跳转到第{0}页"})

@*<table>
    
        <tr>
@foreach(var item in Model) {

  
        <td>
          <a href="@Url.Action("checkVr", new {rescourceid=item.resourceid})"> <img src="../../Uploads/@item.resourceid/@item.imageurl" onload="javascript:DrawImage(this,200,100)" /></a>
        </td>

        }
    </tr>
</table>*@







